bimodal blkback: Support multiple ring protocols.
This is needed for 32-on-64 support. Right now there are three
protocols: native, x86_32 and x86_64. If needed it can be extended.
Interface changes (io/blkif.h)
* Define the x86_32 and x86_64 structs additionally to the native
version.
* Add helper functions to convert them requests to native.
Backend changes:
* Look at the "protocol" name of the frontend and switch ring
handling accordingly. If the protocol node isn't present it
assumes native protocol.
* As the request struct is copied anyway before being processed (for
security reasons) it is converted to native at that point so most
backend code doesn't need to know what the frontend speaks.
* In case of blktap this is completely transparent to userspace, the
kernel/userspace ring is always native no matter what the frontend
speaks.
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>